
<?php
$con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  mysql_select_db("ETrawelMart",$con);
  
  $trips = mysql_query("SELECT * FROM tours");
  
  $getname=$_GET["tripname"];
  
  while($row = mysql_fetch_array($trips))
  {
	  if($row['name']==$getname)
	  {
       print $row['tripcode'];
       }
  }
  
 
  mysql_close($con);
  
  ?>
